﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace TimViec.NTD
{
    public partial class ThongTinTaiKhoan : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["NTD"] == null)
            {
                Response.Redirect("/nha-tuyen-dung.html");
            }
            if(!IsPostBack)
            {
                LoadData();
            }
        }
        public void LoadData()
        {
            DAL.UserTuyenDung user = BLL.TuyenDung.UserHelper.Get_UserEmail(Session["NTD"].ToString());
            if(user !=null)
            {
                lbDiaChi.Text = user.DiaChi;
                lbDienThoai.Text = user.DienThoai;
                lbDienThoaiLienHe.Text = user.DienThoaiLienHe;
                lbEmailLienHe.Text = user.EmailLienHe;
                lbFax.Text = user.Fax;
                lbNguoiLienHe.Text = user.NguoiLienHe;
                lbSoLuocCty.Text = user.SoLuocCongTy;
                lbSoNhanVien.Text = user.SoNhanVien;
                lbTenCongTy.Text = user.TenCongTy;
                lbTenLienHe.Text = user.TenLienHe;
                lbUserName.Text = user.Email;
                lbWebsite.Text = user.Website;
                image_logo.ImageUrl = user.UrlLogo;
            }
        }
        protected void btUpdate_Click(object sender, EventArgs e)
        {
            Response.Redirect("/nha-tuyen-dung/cap-nhat-tai-khoan.html");
        }

        protected void btBack_Click(object sender, EventArgs e)
        {
            Response.Redirect("/nha-tuyen-dung/index.html");
        }
    }
}